package com.tmxk.spring.service.impl;

import com.tmxk.spring.SysRole;
import com.tmxk.spring.dao.SysRoleMapper;
import com.tmxk.spring.dao.impl.SysRoleMapperImpl;
import com.tmxk.spring.service.SysRoleService;

public class SysRoleServiceImpl implements SysRoleService {
    //调用数据访问层对象,不以硬编码的形式创建
    private SysRoleMapper roleMapper ;

    public void setRoleMapper(SysRoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }

    @Override
    public boolean isSave(SysRole sysRole) {
        return roleMapper.addSave(sysRole) > 0 ? true : false;
    }
}
